<% 
	var headContent = {
%>
	<% include("/pages/web/web_header.html"){} %>
	
	<script type="text/javascript" src="pages/web/show_article.js"></script>
<%
};

var bodyContent = {
%>
<%  include("/pages/web/home_header.html"){} %>	

	<input type="hidden" name="article_id" value="${item.id}">
	<input type="hidden" name="create_id" value="${item.create_id}">
	<input type="hidden" name="count_comment" value="${item.count_comment!'0'}">
	
	<div class="x-page-container">
		<div class="mod-diary">
			<div class="mod-diary-top"></div>
			<div class="mod-diary-inner">
				<div class="mod-diary-pen"></div>
				<div class="mod-diary-nav"></div>
				<div class="mod-diary-clip"></div>
				<div class="mod-topspaceinfo">
					<h1>
						<a class="space-name" href="javascript:void(0);">${WEB_TITLE }</a>
					</h1>
				</div>

				<div class="mod-bloglist">
					<div class="mod-blogitem">
						<div class="box-postdate">
						${item.publish_time!''}
						<p title="${item.publish_user!''}" >
						<a class="box-postuser" href="web_article/user/${item.create_id}"  target="_blank">${flyfox.suojin(item.publish_user!'',6)}</a>
						</p>
						</div>
						<div class="item-title">
							<a href="javascript:void(0);">${item.title}</a>
							<div class="item-right">
							<% if(item.is_comment=='1'){ %>
							<a href="web_article/${item.id}#article_comment" style="font-size: 12px;"><span id="count_comment_show">评论(${item.count_comment!'0'})</span></a>
							<% } %>
							<span>浏览量(${item.count_view!'0'})</span>
							</div>
						</div>
						<div class="item-content">${item.content!'' }</div>
						<div class="item-footer">
								<div class="item-left">
								<%  
									if(taglist != null && taglist.~size > 0) {
								%>
									<ul class="q-taglist clearfix">
										<li title="标签"><span class="q-icon"></span></li>
									<%
										for(tagitem in taglist){ 
									%>
										<li class="q-tagitem">
										<a class="a-tagitem" href="web_tags/${tagitem.tagname}">${tagitem.tagname}</a>
										</li>
									<% 
										}
									%>
									</ul>
								<%
								} 
								%>
								</div>
								
								<div class="item-right">
									<!-- 百度分享 -->
									<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more">分享到：</a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
									<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
								</div>
							</div>
					</div>
				</div>
				
				<% if(item.is_comment=='1'){ %>
				<div class="mod-bloglist" id="article_comment">
					<div class="mod-blogcommentitem">
					<% if(!isEmpty(session.session_user)){ %>
					<div class="comment-inner ">
						<div class="comment-title">评论</div>
						<div>
						<textarea class="comment-textarea" name="comment"></textarea>
						</div>
						<div class="comment-btn">
							<input id="comment-btn" type="button" value="发  布"  class="btn" style="background-color: #FF9933;"/>
						</div>
					</div>
					<% } else { %>
					<div class="comment-inner ">
						<div class="comment-title">没有<a href="web/login">登陆</a>不能评论</div>
					</div>
					<% } %>
					<div class="comment-list">
					
						<% for(comment in page.list){ %>
						<div class="comment-item" id="comment_${comment.id}_${comment.article_id}">
							<div class="item-top">
								<% var user = flyfox.getUser(comment.create_id);  %>
								<a href="#"><img width="32" height="32" alt="头像" class="img_radius"
									src="${user.title_url!'static/images/user/user.png'}" /></a>
								<a href="web_article/user/${comment.create_id}" class="user-name">${flyfox.getUserName(comment.create_id)}</a>
								<% if(comment.status > 20) { %>
								<span class="comment-txt">回复</span>
								<a href="web_article/user/${comment.reply_userid}" class="user-name">${flyfox.getUserName(comment.reply_userid)}</a>
								<% } %>
								<br>
								<span>${comment.content}</span>
							</div>
							<div class="item-bottom">
								<span>${comment.create_time}</span>
								<% if(!isEmpty(session.session_user) && comment.create_id==session.session_user.userid){ %>
									<a href="javascript:oper_del_comment(${comment.id});" style="float: right;">删除</a>
								<% } %>
								<% if(!isEmpty(session.session_user) && comment.create_id!=session.session_user.userid){ %>
									<a href="javascript:oper_reply_comment(${comment.create_id},'${flyfox.getUserName(comment.create_id)}');" style="float: right;">回复</a>
								<% } %>
							</div>
						</div>
						<%  } %>
						
					</div>
					<%include("/static/component/include/web_paginator.html",{suffix:'#article_comment'}){} %>
					</div>
					
				</div>
				<% } %>
				
			</div>
			<div class="mod-diary-bottom"></div>
		</div>
	</div>
	
	<%  include("/pages/web/home_footer.html"){} %>	
	
	<a id="scrollTop" href="javacript:void(0);" title="返回顶部" style="display: inline;"></a>
<%}; %>


<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%} %>
